package com.yoyo.itravel.service;

import com.yoyo.itravel.bean.SightComment;
import com.yoyo.itravel.exceptions.SightCommentException;

import java.util.List;

/**
 * @Description 景点评论服务层接口
 *
 * @author HZX
 * @date 2020/5/20 22:10
 */
public interface ISightCommentService {

    /**
     * @Description 插入评论数据
     *
     * @param sightComment
     * @return int
     */
    boolean addComment(SightComment sightComment, String[] imgPaths) throws SightCommentException;

    /**
     * @Description 通过评论id删除景点评论数据
     *
     * @param commentId
     * @return int
     */
    boolean deleteByCommentId(String commentId) throws SightCommentException;

    /**
     * @Description 通过评论id查询景点评论数据
     *
     * @param commentId
     * @return SightCollect
     */
    SightComment findByCommentId(String commentId) throws SightCommentException;

    /**
     * @Description 通过用户id查询该用户发表的所有的对景点的评论
     *
     * @param userId
     * @return java.util.List<cn.hut.travel.bean.Sight>
     */
    List<SightComment> findAllByUserId(String userId) throws SightCommentException;

    /**
     * @Description 通过景点id获得该景点的所有评论
     *
     * @param sightId
     * @return java.util.List<cn.hut.travel.bean.SightComment>
     */
    List<SightComment> findAllBySightIdAndStar(String sightId, Integer starNum) throws SightCommentException;

    /**
     * @Description 通过评论id修改点赞数
     *
     * @param commentId
     * @return boolean
     */
    boolean updateLikeNum(String commentId, boolean isAdd) throws SightCommentException;
}
